<%@ page language="java" contentType="text/html; charset=BIG5" pageEncoding="BIG5"%>
<%@page import="db.mysql.mySqlUtils"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=BIG5">

<script1 type="text/javascript" src="../../js/jquery-1.6.2.min.js"></script>
<script src="../../js/jquery.jqGrid-4.1.2/js/jquery-1.5.2.min.js" type="text/javascript"></script>
<script src="../../js/jquery.jqGrid-4.1.2/js/jquery.jqGrid.min.js" type="text/javascript"></script>
<script src="../../js/jquery.jqGrid-4.1.2/plugins/jquery.tablednd.js" type="text/javascript"></script>
<script src="../../js/jquery.jqGrid-4.1.2/plugins/jquery.contextmenu.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" media="screen" href="../../js/jquery.jqGrid-4.1.2/css/ui.jqgrid.css" />
<title>Setting</title>
<script type="text/javascript">
function getColor(){
	try{
		//alert(1);
		var url = "/Goomi/Ajax.template?class=goomi.color.colorService&method=getColors&para=" + "123" ;
		$.getJSON(url, 
			function(json){
				alert(json);
		});
	}catch(e){
		alert(e);
	}
}
getColor();

//var url2 = "/Goomi/Ajax.template?class=goomi.color.colorService&method=getColors&para=" + "123" ;

//jQuery("#list2").jqGrid({ url:url2, datatype: "json", colNames:['Inv No','Date', 'Client', 'Amount','Tax','Total','Notes'], colModel:[ {name:'id',index:'id', width:55}, {name:'invdate',index:'invdate', width:90}, {name:'name',index:'name asc, invdate', width:100}, {name:'amount',index:'amount', width:80, align:"right"}, {name:'tax',index:'tax', width:80, align:"right"}, {name:'total',index:'total', width:80,align:"right"}, {name:'note',index:'note', width:150, sortable:false} ], rowNum:10, rowList:[10,20,30], pager: '#pager2', sortname: 'id', viewrecords: true, sortorder: "desc", caption:"JSON Example" }); jQuery("#list2").jqGrid('navGrid','#pager2',{edit:false,add:false,del:false});
</script>
</head>
<body>
<table id="list9"></table>
<div id="pager9"></div>
<br />
<a href="javascript:void(0)" id="m1">Get Selected id's</a>
<a href="javascript:void(0)" id="m1s">Select(Unselect) row 13</a>

15
<script type="text/javascript">
var url2 = "/Goomi/Ajax.template?class=goomi.color.colorService&method=getColors&para=" + "123" ;

jQuery("#list9").jqGrid({
    url: "/Goomi/Ajax.template?class=goomi.color.colorService&method=getColors&para=123",
 datatype: "json",
    colNames:['Inv No','Date', 'Client', 'Amount','Tax','Total','Notes'],
    colModel:[
        {name:'id',index:'id', width:55},
        {name:'invdate',index:'invdate', width:90},
        {name:'name',index:'name', width:100},
        {name:'amount',index:'amount', width:80, align:"right"},
        {name:'tax',index:'tax', width:80, align:"right"},        
        {name:'total',index:'total', width:80,align:"right"},        
        {name:'note',index:'note', width:150, sortable:false}        
    ],
    rowNum:10,
    rowList:[10,20,30],
    pager: '#pager9',
    sortname: 'id',
 recordpos: 'left',
 viewrecords: true,
 sortorder: "desc",
 multiselect: true,
 caption: "Multi Select Example"
});
jQuery("#list9").jqGrid('navGrid','#pager9',{add:false,del:false,edit:false,position:'right'});
jQuery("#m1").click( function() {
 var s;
 s = jQuery("#list9").jqGrid('getGridParam','selarrrow');
 alert(s);
});
jQuery("#m1s").click( function() {
 jQuery("#list9").jqGrid('setSelection',"13");
});
</script>
</body>
</html>